<script>
import { ref } from 'vue'

export default {
    data(){
        return{
            count:0
        }
    },
    methods:{
        increment(){
            this.count++
        }
    },
    mounted(){
        // console.log(`The initial count is ${this.count}.`)
    },

    setup(){
        const count2 =ref(0)

        function increment2(){
            count2.value++
        }

        return {
            count2,
            increment2
        }
    }

}
</script>
<template>
    <h1>Options API</h1>
    <button @click="increment()">Count is: {{ count }}</button>
    <button @click="increment2()">Count2 is: {{ count2 }}</button>
</template>